﻿using System;

namespace MockingBird.Simulator.Interceptors.Wcf.SimulatorTester
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "MockingBird SimulatorHost Test Application";

            Console.WriteLine("**********************************************************");
            Console.WriteLine("Starting  MockingBird SimulatorHost Test Application");
            Console.WriteLine("**********************************************************");
            Console.WriteLine(Environment.NewLine);
            Console.WriteLine("NOTE: This will test all the currently available bindings. Exceptions are displayed and the tests continue.");

            ExecuteTests();

            Console.WriteLine("Press any key to exit...");
            Console.ReadLine();


        }

        private static void ExecuteTests()
        {
            SimulatorTester st = new SimulatorTester();

            try
            {
                st.TestIOneWay();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.WriteLine("----------------------------------------");

            try
            {
                st.TestITwoWay();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.WriteLine("----------------------------------------");
            try
            {
                st.TestITwoWay_netNamedPipe();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.WriteLine("----------------------------------------");

            try
            {
                st.TestITwoWay_netTcp();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);

            }

            Console.WriteLine("----------------------------------------");

            try
            {
                st.TestITwoWayVoid();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.WriteLine("----------------------------------------");
        }
    }
}
